/**
 *
 */
package com.ybkj.daijia.server.service.impl;

import com.ybkj.daijia.server.mapper.ChargeStartTimeOfEmployMapper;
import com.ybkj.daijia.server.model.ChargeStartTimeOfEmploy;
import com.ybkj.daijia.server.service.ChargeStartTimeOfEmployService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Shine
 *
 */
@Service
public class DefaultChargeStartTimeOfEmployService implements ChargeStartTimeOfEmployService {

    @Autowired
    private ChargeStartTimeOfEmployMapper chargeStartTimeOfEmployMapper;

    @Transactional(rollbackFor = Exception.class)
    public void delete(ChargeStartTimeOfEmploy cst) {
        // 删除时间段
        chargeStartTimeOfEmployMapper.deleteByPrimaryKey(cst.getId());

    }

    @Override
    public ChargeStartTimeOfEmploy findOne(Long id) {
        return chargeStartTimeOfEmployMapper.selectByPrimaryKey(id);
    }

}